package org.zch.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zch.dao.PublicDAO;
import org.zch.entity.po.PublicPO;
import org.zch.service.PublicService;

import java.util.List;

/**
 * 广场
 */
@Service
public class PublicServiceImpl implements PublicService {

    @Autowired
    private PublicDAO publicDAO;


    @Override
    public PublicPO findALl() {
        PublicPO po = null;
        List<PublicPO> publicPOS = publicDAO.selectList(null);
        if (publicPOS != null && !publicPOS.isEmpty()){
            po = publicPOS.get(0);
        }
        return po;
    }

    @Override
    public Integer upDataSysTem(PublicPO publicPO) {
        return publicDAO.updateById(publicPO);
    }
}
